package com.sky.common.exception;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.security.access.AccessDeniedException;

/**
 * @author
 * @date 2023/3/2 3:15
 **/
public class SkySecurityException extends AccessDeniedException {
    private Integer code;

    public SkySecurityException(String msg, Integer code) {
        super(msg);
        this.code = code;

    }

    public SkySecurityException(String msg, Throwable t) {

        super(msg, t);
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    @Override
    public String toString() {
        return "SkySecurityException{" +
                "code=" + code +
                '}';
    }
}
